package com.ambow.dao.impl;

import java.util.List;

import com.ambow.dao.ProductDao;
import com.ambow.entity.Product;
import com.ambow.utils.BaseDAO;
import com.ambow.utils.PageResults;

public class ProductDaoImpl implements ProductDao {

	@Override
	public List<Product> getRand(String hql) {
		return BaseDAO.queryRandBySql(Product.class,hql);
	}
	@Override
	public Product queryOne(String sql) {
		return (Product) BaseDAO.getSingleBySql(Product.class, sql);
	}

	@Override
	public PageResults<Product> getPageByFetchedHql(String hql, String countHql, Integer pageNo, Integer pageSize) {
		return BaseDAO.getPageByFetchedHql(hql, countHql, pageNo, pageSize);
		
		
	}

}
